<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('GMT');
// mise en place des répertoires et chargement des classes
set_include_path('.'
    . PATH_SEPARATOR . './library'
    . PATH_SEPARATOR . './application/models/'
    . PATH_SEPARATOR . get_include_path());
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);

$config = new Zend_Config_Ini('./configuration/db.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);

 // Mise en place de la BDD
$db = Zend_Db::factory($config->db);
Zend_Db_Table::setDefaultAdapter($db);


// setup controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->setControllerDirectory('./application/controllers');
Zend_Layout::startMvc(array('layoutPath'=>'./application/layouts'));
// run!
$frontController->dispatch();
session_cache_limiter ('private_no_expire');
